class_name CharacterDataModifier
extends Resource



@export var field: String
@export var value: float


var _item: DataItem


func apply(data: CharacterData) -> void:
    _item = data.get(field)
    if _item == null:
        print_debug("Field %s not found" % field)
        return
    _item.add_modifier(value)


func remove() -> void:
    _item.add_modifier(-value)